#ifndef DEFALUTLEXER_H
#define DEFALUTLEXER_H
#include <Qsci/qscilexercustom.h>
#include "Include/ILexer.h"

namespace Lexers{

class DefaultLexer: public QsciLexerCustom, public ILexer
{
public:
    enum {
        Default,
        DoubleQuotedString,
        SingleQuotedString,
        Number
    };
    DefaultLexer(QObject *parent);
    virtual ~DefaultLexer();

    virtual QsciLexer * lexer();
    virtual void setTheme(ITheme *);
    virtual QList<int> styles();

    virtual const char* language() const;
    virtual QString description(int) const;
    virtual void styleText(int, int);
    virtual QString nameInTheme(int) const;
    virtual QString name();
    virtual QColor color(int);
private:
    void pushStyle(int pos, int style);
    void popStyle(int pos, int style);
private:
    struct StyleStruct{
        int start;
        int style;
        StyleStruct(int istart, int istyle){
            start = istart;
            style = istyle;
        }
    };
    QList<StyleStruct> _stylesMap;
};

}

#endif // DEFALUTLEXER_H
